﻿
$(document).ready(function()
{
    $(".a3").keyup(function() {
        var tmptxt = $(this).val();
        $(this).val(tmptxt.replace(/\D|/g, ''));
    }).bind("paste", function() {
        var tmptxt = $(this).val();
        $(this).val(tmptxt.replace(/\D|/g, ''));
    }).css("ime-mode", "disabled"); 
})


function ValidData() {

    var txtIP1 = document.getElementById(mstrControlProfix + "IP1");
    var txtIP2 = document.getElementById(mstrControlProfix + "IP2");
    var txtIP3 = document.getElementById(mstrControlProfix + "IP3");
    var txtIP4 = document.getElementById(mstrControlProfix + "IP4");
    var txtIP5 = document.getElementById(mstrControlProfix + "IP5");
    var txtIP6 = document.getElementById(mstrControlProfix + "IP6");
    var txtIP7 = document.getElementById(mstrControlProfix + "IP7");
    var txtIP8 = document.getElementById(mstrControlProfix + "IP8");

    if (txtIP1.value == "") {
        alert("IP不能为空。");
        txtIP1.focus();
        return false;
    }
    if (txtIP2.value == "") {
        alert("IP不能为空。");
        txtIP2.focus();
        return false;
    }
    if (txtIP3.value == "") {
        alert("IP不能为空。");
        txtIP3.focus();
        return false;
    }
    if (txtIP4.value == "") {
        alert("IP不能为空。");
        txtIP4.focus();
        return false;
    }
    if (txtIP5.value == "") {
        alert("IP不能为空。");
        txtIP5.focus();
        return false;
    }
    if (txtIP6.value == "") {
        alert("IP不能为空。");
        txtIP6.focus();
        return false;
    }
    if (txtIP7.value == "") {
        alert("IP不能为空。");
        txtIP7.focus();
        return false;
    }
    if (txtIP8.value == "") {
        alert("IP不能为空。");
        txtIP8.focus();
        return false;
    }
    return true;
}
